﻿Imports System.Data  


Public Class CFlujoValmer

Private _fecha        As string
Private _dias         As string
Private _periodo      As string 
Private _intereses    As string 
Private _valorNominal As string 
Private _amortizacion As string 
Private _flujo        As string 
Private _settlement   As string 

Public sub new ()

End Sub

Public sub new (ByRef registro As datarow)
  _fecha          = IIf(IsDBNull(registro(0)),"",  registro(0))  
  _dias           = IIf(IsDBNull(registro(1)),"",  registro(1))  
  _periodo        = IIf(IsDBNull(registro(2)),"",  registro(2))  
  _intereses      = IIf(IsDBNull(registro(3)),"",  registro(3))  
  _valorNominal   = IIf(IsDBNull(registro(4)),"",  registro(4))  
  _amortizacion   = IIf(IsDBNull(registro(5)),"",  registro(5))  
  _flujo          = IIf(IsDBNull(registro(6)),"",  registro(6))  

End Sub




Public Property Fecha() As String 
    Get
        Return _fecha 
    End Get
    Set(ByVal value As String)
        _fecha  = value
    End Set
End Property


Public Property Dias() As String
    Get
        Return _dias
    End Get
    Set(ByVal value As String)
        _dias  = value
    End Set
End Property


Public Property Periodo() As String
    Get
        Return _periodo 
    End Get
    Set(ByVal value As String )
        _periodo  = value
    End Set
End Property


Public Property Intereses() As String 
    Get
        Return _intereses 
    End Get
    Set(ByVal value As String)
        _intereses  = value
    End Set
End Property


Public Property ValorNominal() As String 
    Get
        Return _valorNominal
    End Get
    Set(ByVal value As String )
        _valorNominal = value
    End Set
End Property


Public Property Amortizacion() As String
    Get
        Return _amortizacion
    End Get
    Set(ByVal value As String)
        _amortizacion = value
    End Set
End Property


Public Property Flujo() As String
    Get
        Return _flujo
    End Get
    Set(ByVal value As String)
        _flujo = value
    End Set
End Property


Public Property Settlement() As String
    Get
        Return _settlement
    End Get
    Set(ByVal value As String)
        _settlement = value
    End Set
End Property




    Public Overrides Function ToString() As String

        Try
           Return _fecha.ToString() & "," & _dias & "," & _periodo & "," & _intereses & "," &  _valorNominal & "," & _amortizacion & "," & _flujo & "," & _settlement.ToString ()
        Catch ex As Exception
            Return ""
        End Try
        
    End Function






End Class
